package com.coolingme.promotion;

/**
 * 促销活动，由该类使用具体促销策略
 *
 * @author wangyue
 * @date 2020-09-22 21:48
 */
public class PromotionActivity {

    public void execute() {
        this.execute(null);
    }

    public void execute(String strategyKey) {
        // 使用工厂模式获取策略
        IPromotionStrategy strategy = PromotionStrategyFactory.getPromotionStrategy(strategyKey);
        strategy.doPromotion();
    }

}
